package com.qingxin.cms.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * 信息反馈附件
 */
@Entity
@Table(name = "feedback_msg_attachment")
public class FeedbackMsgAttachment extends com.qingxin.sys.entity.BaseEntity
		implements java.io.Serializable {
	private static final long serialVersionUID = 7809540065858133074L;
	// Fields

	private String id;
	private FeedbackMsg feedbackMsg;
	private String fileName;
	private String filePath;
	private String fileExt;
	private Integer fileSize;
	private Integer isRemote;
	private Date createTime;
	private String createBy;

	// Constructors

	/** default constructor */
	public FeedbackMsgAttachment() {
	}

	/** full constructor */
	public FeedbackMsgAttachment(FeedbackMsg feedbackMsg, String fileName,
			String filePath, String fileExt, Integer fileSize,
			Integer isRemote, Date createTime, String createBy) {
		this.feedbackMsg = feedbackMsg;
		this.fileName = fileName;
		this.filePath = filePath;
		this.fileExt = fileExt;
		this.fileSize = fileSize;
		this.isRemote = isRemote;
		this.createTime = createTime;
		this.createBy = createBy;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "feedback_id")
	public FeedbackMsg getFeedbackMsg() {
		return this.feedbackMsg;
	}

	public void setFeedbackMsg(FeedbackMsg feedbackMsg) {
		this.feedbackMsg = feedbackMsg;
	}

	@Column(name = "file_name", length = 200)
	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	@Column(name = "file_path", length = 200)
	public String getFilePath() {
		return this.filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	@Column(name = "file_ext", length = 10)
	public String getFileExt() {
		return this.fileExt;
	}

	public void setFileExt(String fileExt) {
		this.fileExt = fileExt;
	}

	@Column(name = "file_size")
	public Integer getFileSize() {
		return this.fileSize;
	}

	public void setFileSize(Integer fileSize) {
		this.fileSize = fileSize;
	}

	@Column(name = "is_remote")
	public Integer getIsRemote() {
		return this.isRemote;
	}

	public void setIsRemote(Integer isRemote) {
		this.isRemote = isRemote;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "create_by", length = 32)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

}